<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<div id="a">
	</div>
	<body>
		<h2>提交成功</h2>
		<a href='秒杀.html'><span id="b">5</span>秒后系统会自动跳转，也可以单击此链接跳转。</a>
		<script>
		 /*1.数字递减
		  2.当数字到0时，跳转到某个URL*/
	    var number=5;
	    var span=document.getElementById('b');
	  function  Down(){
	  	if(number>0){
	  		number--;
	  		span.innerHTML=number;
	  	}else{
	  		clearInterval(end);
	  		location.href="秒杀.html";
	  	}
	  	
	  }
	    var end=window.setInterval(Down,1000);
		</script>
	</body>
</html>
